package com.googlecode.jerato.library.store;

import java.util.ArrayList;
import java.util.List;

public class DataTable {

	protected String _tableName;
	protected List _columnList = new ArrayList();

	public DataTable(String tableName){
		_tableName = tableName;
	}

	public String getTableName(){
		return _tableName;
	}

	public DataColumn addColumn(DataColumn column){
		_columnList.add(column);
		return column;
	}

	public DataColumn getColumn(int index){
		return (DataColumn)_columnList.get(index);
	}

	public String getColumnName(int index){
		DataColumn column = (DataColumn)_columnList.get(index);
		return column.getName();
	}

	public int getColumnCount(){
		return _columnList.size();
	}
}
